/** Copyright (c) 2011 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

button:not([class]),
input[type='button']:not([class]),
input[type='submit']:not([class]) {
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-user-select: none;
  background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);
  border: 1px solid #aaa;
  color: #444;
  font-size: inherit;
  margin-bottom: 0;
  min-width: 4em;
  padding: 3px 12px;
}

button:not([class]):hover,
input[type='button']:not([class]):hover,
input[type='submit']:not([class]):hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  background: #ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9);
  border-color: #999;
  color: #222;
}

button:not([class]):active,
input[type='button']:not([class]):active,
input[type='submit']:not([class]):active {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  background: #ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc);
  color: #333;
}

button[disabled]:not([class]),
input[type='button'][disabled]:not([class]),
input[type='submit'][disabled]:not([class]),
button[disabled]:not([class]):hover,
input[type='button'][disabled]:not([class]):hover,
input[type='submit'][disabled]:not([class]):hover {
  box-shadow: none;
  background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);
  border-color: #aaa;
  color: #888;
}

button:not([class]):focus,
input[type='submit']:not([class]):focus,
input[type='text']:not([class]):focus,
select:not([class]):focus {
  box-shadow: inset 0 1px 2px white,
      0 1px 2px rgba(0, 0, 0, .2),
      0 0 1px #c0c0c0,
      0 0 1px #c0c0c0,
      0 0 1px #c0c0c0;
  -webkit-transition: border-color 200ms;
  /* We use border color because it follows the border radius (unlike outline).
   * This is particularly noticeable on mac. */
  border-color: #4080fa;
  outline: none;
}

/* Search boxes use an outline because it follows the contours of the box.
 * TODO(estade): remove the first 2 of these selectors when we use checkbox.css
 * in more places. */
input[type='checkbox']:not([class]):focus,
input[type='radio']:not([class]):focus,
input[type='search']:not([class]):focus {
  outline-color: #4080fa;
}

/* TODO(jhawkins): Refactor button styling and remove !important here. This is
 * currently necessary because individual page button element selectors have
 * higher specificity.
 */
.link-button,
.link-button:focus,
.link-button:hover {
  box-shadow: none !important;
  background: transparent none !important;
  border: none !important;
  color: rgb(63, 110, 194);
  cursor: pointer;
  margin: 0;
  text-decoration: underline;
}

.link-button:active {
  color: rgb(37, 64, 113);
}
